﻿using System.Collections.Generic;
using System.Xml.Serialization;
using Newtonsoft.Json;

namespace Smugmug
{
    [XmlType("Albums"), JsonObject]
    public class AlbumCollection : List<Album>
    {   
    }

    [JsonObject]
    public class Album : IIdentifiable<int>
    {
        [XmlAttribute("id"), JsonProperty("id")]
        public int Id { get; set; }
        [XmlAttribute]
        public string Key { get; set; }
        [XmlAttribute]
        public string Title { get; set; }
        public Category Category { get; set; }
        public Category SubCategory { get; set; }

        [XmlAttribute]
        public string Description { get; set; }
        [XmlAttribute]
        public string Keywords { get; set; }
        [XmlAttribute]
        public bool Geography { get; set; }
        [XmlAttribute]
        public int Position { get; set; }
        public Highlight Highlight { get; set; }
        [XmlAttribute]
        public int ImageCount { get; set; }
        [XmlAttribute]
        public string LastUpdated { get; set; }
        [XmlAttribute]
        public bool Header { get; set; }
        [XmlAttribute]
        public bool Clean { get; set; }
        [XmlAttribute("EXIF"), JsonProperty("EXIF")]
        public bool Exif { get; set; }
        [XmlAttribute]
        public bool Filenames { get; set; }
        public Template Template { get; set; }
        //TODO: change SortMethod to use an enum
        [XmlAttribute]
        public string SortMethod { get; set; }
        //TODO: change SortDirection to use an enum
        [XmlAttribute]
        public bool SortDirection { get; set; }
        [XmlAttribute]
        public bool SquareThumbs { get; set; }
        [XmlAttribute]
        public string Password { get; set; }
        [XmlAttribute]
        public string PasswordHint { get; set; }
        [XmlAttribute]
        public bool Public { get; set; }
        [XmlAttribute]
        public bool WorldSearchable { get; set; }
        [XmlAttribute]
        public bool SmugSearchable { get; set; }
        [XmlAttribute]
        public bool External { get; set; }
        [XmlAttribute]
        public bool Protected { get; set; }
        [XmlAttribute]
        public bool Watermarking { get; set; }
        public Watermark Watermark { get; set; }
        [XmlAttribute]
        public bool HideOwner { get; set; }
        [XmlAttribute]
        public bool Larges { get; set; }
        [XmlAttribute]
        public bool XLarges { get; set; }
        [XmlAttribute]
        public bool X2Larges { get; set; }
        [XmlAttribute]
        public bool X3Larges { get; set; }
        [XmlAttribute]
        public bool Originals { get; set; }
        [XmlAttribute]
        public bool CanRank { get; set; }
        [XmlAttribute]
        public bool FriendEdit { get; set; }
        [XmlAttribute]
        public bool FamilyEdit { get; set; }
        [XmlAttribute]
        public bool Comments { get; set; }
        [XmlAttribute]
        public bool Share { get; set; }
        [XmlAttribute]
        public bool Printable { get; set; }
        [XmlAttribute]
        public bool DefaultColor { get; set; }
        [XmlAttribute]
        public int ProofDays { get; set; }
        [XmlAttribute]
        public string Backprinting { get; set; }
        [XmlAttribute]
        public double UnsharpAmount { get; set; }
        [XmlAttribute]
        public double UnsharpRadius { get; set; }
        [XmlAttribute]
        public double UnsharpThreshold { get; set; }
        [XmlAttribute]
        public double UnsharpSigma { get; set; }
        public Community Community { get; set; }
        public Theme Theme { get; set; }

        public ImageCollection Images { get; set; }
    }
}